<include file="Public:header" />
<a href="{:U('Good/add/')}">添加商品</a>
    <form >
        <select name="brand">
            <option value="0">--选择品牌--</option>
            <foreach name="brand" item="b" >
                <option value="{$b.id}"<if condition="$brandId == $b['id']"> selected="selected"</if>>{$b.initials} {$b.name}</option>
            </foreach>
        </select>
        <select name="pro">
            <option value="0">--选择商品类型--</option>
            <foreach name="goodPro" item="gp" >
                <option value="{$gp.id}" <if condition="$proId == $gp['id']"> selected="selected"</if>>{$gp.name}</option>
            </foreach>
        </select>
        <select name="material">
            <option value="0">--选择材质--</option>
            <foreach name="material" item="m" >
                <option value="{$m.id}" <if condition="$materialId == $m['id']"> selected="selected"</if>>{$m.name}</option>
            </foreach>
        </select>
        <input type="text" name="name" value="{$name}" maxlength="10"/>
        <input type="submit" value="搜索"/>
    </form>
    <table>
        <tr>
            <th>编号</th>
            <th>货号</th>
            <th>品牌</th>
            <th>属性</th>
            <th>类型</th>
            <th>名称</th>
            <th>编辑</th>
        </tr>
        <foreach name="goods" item="g" >
            <tr>
                <td>{$g.id}</td>
                <td>{$g.article_number}</td>
                <td>{$g.brand_name}</td>
                <td>{$g.good_pro_name}</td>
                <td>{$g.brand_pro_name}</td>
                <td>{$g.name}</td>
                <td><a href="{:U('Good/edit/id')}/{$g.id}">编辑</a>&nbsp;|&nbsp;<a class="good" href="{:U('Good/preview/id')}/{$g.id}">预览</a></td>
            </tr>
        </foreach>
    </table>
    <div>{$page}</div>
    <include file="Public:footer" />
